Traffic Light Classifier

Notebook Questions

Criteria Meet Specification

All questions answered

In the project notebook, all questions are answered. (There are two questions total.)

Pre-processing

Criteria Meet Specification

Standardize the input images

All input images (before they are classified) should be processed so that they are the same size.

One-hot encode all output labels

All labels should be a one-hot encoded vector of length 3. Ex. ‘yellow’ becomes: [0, 1, 0].

Create a brightness feature

Criteria Meet Specification

Create a brightness feature that uses HSV color space

Using HSV colorspace, extract a feature from a traffic light image that represents the level(s) of brightness in an image. This feature can help classify any traffic light image. A feature can be a list, array, or a single value.

Classification Model

Criteria Meet Specification

Build a complete classifier

Using any created features, write a classification function that takes in a standardized RGB image and outputs whether a traffic light is red, yellow, or green as a one-hot encoded label.

Model Evaluation

Criteria Meet Specification

Accuracy

The model must have greater than 90% accuracy on the given test set.

No red lights labeled as green

In the given test set, red traffic lights can never be mistakenly labeled as green.

Tips to make your project standout:

  1. (Optional) Aim for >95% classification accuracy.
  2. (Optional) Some lights are in the shape of arrows; further classify the lights as round or arrow-shaped.
  3. (Optional) Add another feature and aim for as close to 100% accuracy as you can get!